﻿namespace AiFrame.InterfaceLib.MVP
{
    /// <summary>
    /// Represents a view which can persist data bindings in conjunction
    /// with a specific data source.
    /// </summary>
    /// <typeparam name="T">Type of the data source.</typeparam>
    public interface ISaveable<T>
    {
        /// <summary>
        /// Saves the data bindings.
        /// </summary>
        void Save();
        
        /// <summary>
        /// Sets the data source.
        /// A view should display data bindings after 
        /// this method is called.
        /// </summary>
        /// <param name="dataSource">The data source.</param>
        void SetDataSource(T dataSource);

    }
}
